<?php
class Q_Rule_Match extends Q_Rule_Abstract {

    /**
     * The parameters that were passed to this rule
     */
    protected $_params = array(
        'field' => 0, // default is zero because this allows $rule->validate('some text')
        'match' => null,
    );
    /**
     * 
     */
    public function isValid($value) {
    
        if (!isset($this->_data[$this->getParam('match')])) return false;
        if ($value == $this->_data[$this->getParam('match')]) return true;
        return false;
    
    }

}